﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="DemoDataBinding.aspx.cs" Inherits="HelloASPNET.Test.DemoDataBinding" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    Xin chao, trinh duyet web ban dang su dung la: <%# Request.Browser.Browser %>
    <br />


    Dropdown list<br />
    <asp:DropDownList ID="DropDownList1" runat="server">
    </asp:DropDownList>
    <br />
    ListBox<br />
    <asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
        <Columns>
            <asp:BoundField DataField="Username" HeaderText="Tên đăng nhập" />
            <asp:CheckBoxField DataField="GioiTinh" HeaderText="Giới tính" />
            <asp:TemplateField HeaderText="Tổng hợp ">
                <ItemTemplate>
                    Họ tên:<b>  <%#Eval("HoTen") %> </b>
                    <br />
                    Username: <a href='ThongTinThanhVien.aspx?user=<%#Eval("Username") %>' ><%#Eval("Username") %></a>
                    <br />
                    Giới tính: <%# Eval("GioiTinh")==null?"":((bool)Eval("GioiTinh")==true?"Nam":"Nữ" )%>

                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <br />

</asp:Content>
